var app = new Vue({
	el: '#app',
	data: lData,
	methods: {
		navOnClick: function(event) {
			var targetUrl = "#";
			for(var i = app.nav.length; i-- > 0;) {
				if(app.nav[i].name == event.target.innerHTML) {
					app.nav[i].active = true
					targetUrl = app.nav[i].url;
					continue
				}
				app.nav[i].active = false
			}
			console.log(targetUrl)
			window.location.href = targetUrl
		},
		anchorOnClick: function(event) {
			var id = event.target.getAttribute('data-id');
			console.log(app.documentationsNav)
			for(var i = app.documentationsNav.length; i-- > 0;) {
				var topNav = app.documentationsNav[i];
				topNav.active = false;
				for(var j = topNav.children.length; j -- > 0;) {
					var secondNav = topNav.children[j];
					if(secondNav.id == id) {
						secondNav.active = true;
					}else{
						secondNav.active = false;
					}
				}
				if(id.startsWith(topNav.id)) {
					topNav.active = true;
				}
			}
		}
	}
})